<%--
  Created by IntelliJ IDEA.
  User: dell
  Date: 2023/4/29
  Time: 20:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--  前缀 c，核心包 --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>学生显示</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>

<script type="text/javascript">


    function deleteStu(studentId) {
        if (window.confirm("是否确定要删除编号为" + studentId + "的这条记录呢？"))
            //页面控制台查看
            // console.log("确定要删除记录")
            location.href = "/studentServlet?type=delete&id=" + studentId;
    }
</script>


</head>


<body>

<div class="rightinfo">

    <div class="tools">
        <ul class="toolbar">
            <li>
                <a href="/studentServlet?type=saveQueryAll">
                    <span><img src="images/t01.png" /></span>添加
                </a>
            </li>
        </ul>

    </div>


    <table class="tablelist">
        <thead>
        <tr>
<%--            <th><input name="" type="checkbox" value="" checked="checked"/></th>--%>
            <th>编号<i class="sort"><img src="images/px.gif" /></i></th>
            <th>学号</th>
            <th>姓名</th>
            <th>手机号</th>
            <th>性别</th>
            <th>地址</th>
            <th>班级</th>
            <th>院系</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${requestScope.list}" var="stu">
            <tr>
<%--                <td><input name="" type="checkbox" value="" /></td>--%>
                <td>${stu.id}</td>
                <td>${stu.stuNum}</td>
                <td>${stu.stuName}</td>
                <td>${stu.phoneNum}</td>
                <td>${stu.gender}</td>
                <td>${stu.address}</td>
                <td>${stu.className}</td>
                <td>${stu.departName}</td>
                <td>
                    <a href="/studentServlet?type=queryById&id=${stu.id}" id="xiu" class="tablelink">修改</a>
                    <a href="JavaScript:deleteStu(${stu.id})" class="tablelink">删除</a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>


<%--    <div class="pagin">--%>
<%--        <div class="message">共<i class="blue">1256</i>条记录，当前显示第&nbsp;<i class="blue">2&nbsp;</i>页</div>--%>
<%--        <ul class="paginList">--%>
<%--            <li class="paginItem"><a href="javascript:;"><span class="pagepre"></span></a></li>--%>
<%--            <li class="paginItem"><a href="javascript:;">1</a></li>--%>
<%--            <li class="paginItem current"><a href="javascript:;">2</a></li>--%>
<%--            <li class="paginItem"><a href="javascript:;">3</a></li>--%>
<%--            <li class="paginItem"><a href="javascript:;">4</a></li>--%>
<%--            <li class="paginItem"><a href="javascript:;">5</a></li>--%>
<%--            <li class="paginItem more"><a href="javascript:;">...</a></li>--%>
<%--            <li class="paginItem"><a href="javascript:;">10</a></li>--%>
<%--            <li class="paginItem"><a href="javascript:;"><span class="pagenxt"></span></a></li>--%>
<%--        </ul>--%>
<%--    </div>--%>


</div>
</body>
</html>